package com.example.java_gobang.service;

import com.example.java_gobang.mapper.UserInfoMapper;
import com.example.java_gobang.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserInfoService {
    @Autowired
    private UserInfoMapper userInfoMapper;
    public UserInfo selectByName(String username) {
        return userInfoMapper.selectByName(username);
    }

    public Integer insertUser(String username, String password) {
        return userInfoMapper.insert(username,password);
    }

    public UserInfo selectById(Integer id) {
        return userInfoMapper.selectById(id);
    }
}
